Product Code Database
Example Keywords: boots -mobile $12-179
barcode-scavenger
   » » Wiki: Zero Flag
Tag Wiki 'Zero Flag'.
Tag

Zero flag
 ( ) 

The zero flag is a single bit flag that is a central feature on most conventional architectures (including x86, , PDP-11, 68000, 6502, and numerous others). It is often stored in a dedicated register, typically called or , along with other flags. The zero flag is typically abbreviated Z or ZF or similar in most documentation and assembly languages.

Along with a , a and an , the zero flag is used to check the result of an arithmetic operation, including bitwise logical . It is set to 1, or true, if an arithmetic result is zero, and reset otherwise. This includes results which are not stored, as most traditional instruction sets implement the compare instruction as a subtract where the result is discarded. It is also common that processors have a bitwise AND-instruction that does not store the result.

The logical formula of the zero flag for a twos-complement binary operand is NOT(OR(all bits of the operand in question)).

In most processors, the zero flag is mainly used in conditional branch instructions, which alter control flow on previous instruction results, but there are often other uses as well.

In some instruction sets such as the MIPS architecture, a dedicated flag register is not used; jump instructions instead check a register for zero.

Page 1 of 1
1
Page 1 of 1
1

Account

Social:
Pages:  ..   .. 
Items:  .. 

Navigation

General: Atom Feed Atom Feed  .. 
Help:  ..   .. 
Category:  ..   .. 
Media:  ..   .. 
Posts:  ..   ..   .. 

Statistics

Page:  .. 
Summary:  .. 
1 Tags
10/10 Page Rank
5 Page Refs